<!doctype html>
<html>
<head>
	<title>DataBind : Example6</title>
	
	<link href="Styles/static.css" type="text/css" rel="Stylesheet" />
	
	<script type="text/javascript" src="Scripts/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="Scripts/jquery.databind.min.js"></script>
		
	<script type="text/javascript">

	    $(document).ready(function() {

	        var purchases = [{ date: '23 april 2009', title: 'Dreams from my Father', amount: 24.99 }, { date: '1 May 2009', title: 'The Fame', amount: 7.99}];
	        var map = ['date', 'amount', 'title'];

	        $('#purchases').binddata(purchases, map, function(args) {

	            //Align totals to the right
	            if (args.key == 'amount') args.element = '<td class="numeric">';
	            return true;
	        });
	    });
	    
	</script>
	
</head>
<body>

    <table id="purchases">
        <thead>
            <tr>
                <th>Date</th><th>Amount</th><th>Description</th>
            </tr>
        </thead>
        <tbody></tbody>
    </table>
		
</body>
</html>
